import request from "@/utils/request.js";

// 根据分类获取分类品牌
export function getCategoryBrandAll(categoryId) {
    return request({
        url: '/product/categoryBrand/brandList/' + categoryId,
        method: 'get'
    })
}
//查询分类品牌列表
export function listCategoryBrand(categoryBrand) {
    return request({
        url: '/product/categoryBrand/list',
        method: 'get',
        params:categoryBrand
    })
}

//新增分类品牌
export function addCategoryBrand(categoryBrand) {
    return request({
        url: '/product/categoryBrand',
        method: 'post',
        data:categoryBrand
    })
}

//修改分类品牌
export function change(categoryBrand) {
    return request({
        url: '/product/categoryBrand',
        method: 'put',
        data:categoryBrand
    })
}
//根据分类id获取品牌列表
export function getInfo(id) {
    return request({
        url: '/product/categoryBrand/'+id,
        method: 'get',
    })
}

//根据分类id获取品牌列表
export function remove(ids) {
    return request({
        url: '/product/categoryBrand/'+ids,
        method: 'delete',
    })
}